Service Manager

Home 

Example: Using Task Status with the WaitForChild Workflow Block

This example shows how to set up a workflow that waits for multiple tasks to be completed before continuing.

Creating a Workflow

Testing the Workflow

Creating a Workflow

1.From the Configuration Console, click Build > Workflow > Workflows to open the Workflows workspace.

2.Click Add new.... The Add New Workflow page appears.

3.Enter the parameters.

ParameterDescription
Business ObjectThe business object. Choose one from the drop-down list. In this example, choose Incident.
List NameA unique name for the workflow object. In this example, enter IncidentTaskStatus.
Display NameA name that appears on workspaces. In this example, enter Incident Task Status.
DescriptionA brief description of what the workflow does.

4.Click Save. The workflow is created.

5.Click Add Version. First version of the workflow is created and the Workflow Designer appears.

6.Drag and drop appropriate blocks from the Blocks panel to design the workflow.

7.Connect all the blocks in a logical flow.

In this example, Start, Run Program, Wait for Child and Stop blocks are used.

8.Define the properties for the blocks by double-clicking the header of the block.

9.Define the following properties.

For example, double-click the header of Wait for Child block. The properties window appears.

PropertyDescription
TitleBlock name. In this example, define the title as Wait for all tasks to Complete.
Relationship NameBlock category. In this example, select IncidentAssocTaskAssignment.
How many children should satisfy conditionsNumber of child items that should satisfy the wait condition. In this example, select All.

Timeout

Timeout duration for wait condition. For this example, set Duration as 5 Mins.

Child Conditions

AND - Child conditions applicable even if Timeout is defined.

OR - Child conditions not applicable if Timeout is set.

In this example, select AND.

FieldChild condition type. In this example, select the child condition type as Task.
OperatorOperator action. In this example, select the operator action as Equal to.
ValueChild condition value. In this example, set the value as Completed.

The properties for every block is dynamic so they vary for each block.

10.You can add or delete child conditions by clicking the add or delete icon.

11.If you have completed defining the properties, click Save. The block property definition is saved.

Workflow Designer

12.Click Save . The workflow is saved and now appears on the workflow list.

Workflow List

Testing the Workflow

Test the workflow by creating an incident record with multiple tasks. Set the tasks to various states and observe the workflow instance.


Was this article useful?